package cn.codeforfun;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Package cn.codeforfun
 * Project SpringBootEnv
 * Author WangBin
 * Email bin.wang12@pactera.com
 * Created on 2017/6/8 14:30
 * version 1.0.0
 */
@SpringBootApplication
public class Application {
  public static void main(String[] args) {
    SpringApplication.run(Application.class);
  }
}

@RestController
class TestController {

  private final Logger log = Logger.getLogger(getClass());

  @Value("${cn.codeforfun.test.str}")
  private String param;

  @RequestMapping
  public String test() {
    log.debug("debug....");
    log.info("info...");
    return param;
  }
}